#ifndef __CONFIG_H
#define __CONFIG_H

#define CFG_USE_WIFI    1
#define CFG_USE_LORA    1

#define CFG_USE_HEART_LED  1
#define CFG_USE_LED1  1
#define CFG_USE_LED2  1
#define CFG_USE_LED3  1
#define CFG_USE_RELAY1  1
#define CFG_USE_RELAY2  1
#define CFG_USE_RELAY3  1
#define CFG_USE_OLED    1

#define CFG_USE_BEEP  1
#define CFG_USE_WATT  1
#define CFG_USE_SMOKE  1
#define CFG_USE_SHAKE  1
#define CFG_USE_RAINMETER  1
#define CFG_USE_TEMINALTMPR  1
#define CFG_USE_DHT11  1

#define CFG_USE_ONENET 1



#define CFG_SHAKE_CH ADC_CH_0
#define CFG_RAINMETER_CH ADC_CH_1
#define CFG_SMOKE_CH ADC_CH_4
#define CFG_TEMINALTMPR_CH ADC_CH_5

#define DHT11_PORT GPIOB
#define DHT11_PIN GPIO_PIN_9

#define HEART_LED_PORT GPIOC
#define HEART_LED_PIN GPIO_PIN_13

#define LED1_PORT GPIOB
#define LED1_PIN GPIO_PIN_3
#define LED2_PORT GPIOB
#define LED2_PIN GPIO_PIN_4
#define LED3_PORT GPIOB
#define LED3_PIN GPIO_PIN_5

#define BEEP_PORT GPIOA
#define BEEP_PIN GPIO_PIN_8

#define RELAY1_PORT GPIOA
#define RELAY1_PIN GPIO_PIN_6
#define RELAY2_PORT GPIOA
#define RELAY2_PIN GPIO_PIN_7
#define RELAY3_PORT GPIOB
#define RELAY3_PIN GPIO_PIN_0

/* ATK-MW1278Dģ�����ò������� */
#define LORA_ADDR 0                                  /* �豸��ַ */
#define LORA_WLRATE ATK_MW1278D_WLRATE_19K2          /* �������� */
#define LORA_CHANNEL 0                               /* �ŵ� */
#define LORA_TPOWER ATK_MW1278D_TPOWER_20DBM         /* ���书�� */
#define LORA_WORKMODE ATK_MW1278D_WORKMODE_NORMAL    /* ����ģʽ */
#define LORA_TMODE ATK_MW1278D_TMODE_TT              /* ����ģʽ */
#define LORA_WLTIME ATK_MW1278D_WLTIME_1S            /* ����ʱ�� */
#define LORA_UARTRATE ATK_MW1278D_UARTRATE_115200BPS /* UARTͨѶ������ */
#define LORA_UARTPARI ATK_MW1278D_UARTPARI_NONE      /* UARTͨѶУ��λ */

#define ESP8266_ONENET_INFO "AT+CIPSTART=\"TCP\",\"mqtts.heclouds.com\",1883"

#define WIFI_SSID "ZTE-KkzQ9X"
#define WIFI_PWD "cygzll0216"
#define TCP_SERVER_IP "192.168.1.100"
#define TCP_SERVER_PORT "6000"

#define PROID "o4beM66apm"

// #define ACCESS_KEY ? ? ? "MGcwZGoyWWNJclRhT0ZCcWw3Y2RlWFNxenpaRlJZNjk="
#define ACCESS_KEY "version=2018-10-31&res=products%2Fo4beM66apm%2Fdevices%2FDEV_001&et=1909115995&method=sha1&sign=Am%2F%2BlJkvhRtS%2Bst6bbb94cH%2FTwA%3D"
#define DEVICE_NAME "DEV_001"

#define CFG_TASK_PERIOD_SLAVE_SI    2000
#define CFG_TASK_PERIOD_SLAVE_SO    2000
#define CFG_TASK_PERIOD_SLAVE_CI    50
#define CFG_TASK_PERIOD_SLAVE_CO    50

#define CFG_TASK_PERIOD_MAIN_SI    50
#define CFG_TASK_PERIOD_MAIN_SO    10000
#define CFG_TASK_PERIOD_MAIN_CI    50
#define CFG_TASK_PERIOD_MAIN_CO    500

#endif
